home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_xemacs.idb / usr / freeware / lib / xemacs-20.4 / lisp / hm--html-menus / hm--html-keys.el.z / hm--html-keys.el
Encoding:
Text File  |  1998-05-21  |  33.0 KB  |  767 lines

  1. ;;; $Id: hm--html-keys.el,v 2.1 1997/05/24 11:49:01 muenkel Exp $
  2. ;;; 
  3. ;;; Copyright (C) 1995, 1996, 1997 Heiko Muenkel
  4. ;;; email: muenkel@tnt.uni-hannover.de
  5. ;;;
  6. ;;;  This program is free software; you can redistribute it and/or modify
  7. ;;;  it under the terms of the GNU General Public License as published by
  8. ;;;  the Free Software Foundation; either version 2, or (at your option)
  9. ;;;  any later version.
  10. ;;;
  11. ;;;  This program is distributed in the hope that it will be useful,
  12. ;;;  but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. ;;;  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. ;;;  GNU General Public License for more details.
  15. ;;;
  16. ;;;  You should have received a copy of the GNU General Public License
  17. ;;;  along with this program; if not, write to the Free Software
  18. ;;;  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19. ;;;
  20. ;;; 
  21. ;;; Description:
  22. ;;;
  23. ;;;    Defines the new keybindigs for the hm--html-menus package.
  24. ;;; 
  25. ;;; Installation: 
  26. ;;;   
  27. ;;;    Put this file in one of your load path directories.
  28. ;;;
  29.  
  30. (if (adapt-emacs19p)
  31.     (progn
  32.  
  33.       (defvar hm--html-emacs19-popup-noregion-menu-button [C-down-mouse-3]
  34.     "This is the mouse button , which pops up the noregion menus.
  35. It could have the same value as 
  36. `hm--html-emacs19-popup-region-menu-button'.")
  37.       
  38.       (defvar hm--html-emacs19-popup-region-menu-button [C-down-mouse-3]
  39.     "This is the mouse button , which pops up the region menus.
  40. It could have the same value as 
  41. `hm--html-emacs19-popup-noregion-menu-button'.")
  42.  
  43.       ))
  44.  
  45.  
  46. (defvar hm--html-noregion-anchor-map nil
  47.   "Noregion sub keymap for inserting anchors.")
  48.  
  49. (if hm--html-noregion-anchor-map
  50.     ()
  51.   (setq hm--html-noregion-anchor-map (make-sparse-keymap))
  52.   (define-key hm--html-noregion-anchor-map "r" 'hm--html-add-relative-link)
  53.   (define-key hm--html-noregion-anchor-map "h" 'hm--html-add-html-link)
  54.   (define-key hm--html-noregion-anchor-map "i" 'hm--html-add-info-link)
  55.   (define-key hm--html-noregion-anchor-map "g" 'hm--html-add-gopher-link)
  56.   (define-key hm--html-noregion-anchor-map "f" 'hm--html-add-file-link)
  57.   (define-key hm--html-noregion-anchor-map "\C-f" 'hm--html-add-ftp-link)
  58.   (define-key hm--html-noregion-anchor-map "n" 'hm--html-add-news-link)
  59.   (define-key hm--html-noregion-anchor-map "m" 'hm--html-add-mail-box-link)
  60.   (define-key hm--html-noregion-anchor-map 
  61.     [(control m)] 'hm--html-add-mailto-link)
  62.   (define-key hm--html-noregion-anchor-map "w" 'hm--html-add-direct-wais-link)
  63.   (define-key hm--html-noregion-anchor-map "\C-w" 'hm--html-add-wais-link)
  64.   (define-key hm--html-noregion-anchor-map "p" 'hm--html-add-proggate-link)
  65.   (define-key hm--html-noregion-anchor-map 
  66.     "\C-p" 'hm--html-add-local-proggate-link)
  67.   (define-key hm--html-noregion-anchor-map "l" 'hm--html-add-normal-link)
  68.   (define-key hm--html-noregion-anchor-map "t" 'hm--html-add-link-target)
  69.   )
  70.  
  71. (defvar hm--html-region-anchor-map nil
  72.   "Region sub keymap for inserting anchors.")
  73.  
  74. (if hm--html-region-anchor-map
  75.     ()
  76.   (setq hm--html-region-anchor-map (make-sparse-keymap))
  77.   (define-key hm--html-region-anchor-map
  78.     "r" 'hm--html-add-relative-link-to-region)
  79.   (define-key hm--html-region-anchor-map "h" 'hm--html-add-html-link-to-region)
  80.   (define-key hm--html-region-anchor-map "i" 'hm--html-add-info-link-to-region)
  81.   (define-key hm--html-region-anchor-map 
  82.     "g" 'hm--html-add-gopher-link-to-region)
  83.   (define-key hm--html-region-anchor-map "f" 'hm--html-add-file-link-to-region)
  84.   (define-key hm--html-region-anchor-map 
  85.     "\C-f" 'hm--html-add-ftp-link-to-region)
  86.   (define-key hm--html-region-anchor-map "n" 'hm--html-add-news-link-to-region)
  87.   (define-key hm--html-region-anchor-map "m" 'hm--html-add-mail-box-link-to-region)
  88.   (define-key hm--html-region-anchor-map
  89.     [(control m)] 'hm--html-add-mailto-link-to-region)
  90.   (define-key hm--html-region-anchor-map 
  91.     "w" 'hm--html-add-direct-wais-link-to-region)
  92.   (define-key hm--html-region-anchor-map 
  93.     "\C-w" 'hm--html-add-wais-link-to-region)
  94.   (define-key hm--html-region-anchor-map 
  95.     "p" 'hm--html-add-proggate-link-to-region)
  96.   (define-key hm--html-region-anchor-map 
  97.     "\C-p" 'hm--html-add-local-proggate-link-to-region)
  98.   (define-key hm--html-region-anchor-map 
  99.     "l" 'hm--html-add-normal-link-to-region)
  100.   (define-key hm--html-region-anchor-map 
  101.     "t" 'hm--html-add-link-target-to-region)
  102.   )
  103.  
  104. (defvar hm--html-noregion-frame-map nil
  105.   "Noregion sub keymap for inserting frame elements.")
  106.  
  107. (if hm--html-noregion-frame-map
  108.     ()
  109.   (setq    hm--html-noregion-frame-map (make-sparse-keymap))
  110.   (define-key hm--html-noregion-frame-map "f" 'hm--html-add-full-html-frame)
  111.   (define-key hm--html-noregion-frame-map [(control d)] 'hm--html-add-doctype)
  112.   (define-key hm--html-noregion-frame-map [(control h)] 'hm--html-add-html) 
  113.   (define-key hm--html-noregion-frame-map [(meta h)] 'hm--html-add-head)
  114.   (define-key hm--html-noregion-frame-map "b" 'hm--html-add-body)
  115.   (define-key hm--html-noregion-frame-map 
  116.     [(control t)] 'hm--html-add-title-and-header)
  117.   (define-key hm--html-noregion-frame-map "t" 'hm--html-add-title)
  118.   (define-key hm--html-noregion-frame-map "h" 'hm--html-add-header)
  119.   (define-key hm--html-noregion-frame-map "m" 'hm--html-add-meta)
  120.   (define-key hm--html-noregion-frame-map "n" 'hm--html-add-normal-node-link)
  121.   (define-key hm--html-noregion-frame-map "i" 'hm--html-add-isindex)
  122.   (define-key hm--html-noregion-frame-map [(meta d)] 'hm--html-add-base)
  123.   (define-key hm--html-noregion-frame-map "a" 'hm--html-add-address)
  124.   (define-key hm--html-noregion-frame-map "s" 'hm--html-add-signature)
  125.   (define-key hm--html-noregion-frame-map 
  126.     [(control c)] 'hm--html-insert-created-comment)
  127.   (define-key hm--html-noregion-frame-map "c" 'hm--html-insert-changed-comment)
  128.   (define-key hm--html-noregion-frame-map 
  129.     [(control m)] 'hm--html-insert-modified-line)
  130.   (define-key hm--html-noregion-frame-map "d" 'hm--html-new-date)
  131.   )
  132.  
  133. (defvar hm--html-region-frame-map nil
  134.   "Region sub keymap for inserting frame elements.")
  135.  
  136. (if hm--html-region-frame-map
  137.     ()
  138.   (setq hm--html-region-frame-map (make-sparse-keymap))
  139.   (define-key hm--html-region-frame-map 
  140.     "f" 'hm--html-add-full-html-frame-with-region)
  141.   (define-key hm--html-region-frame-map 
  142.     [(meta h)] 'hm--html-add-head-to-region)
  143.   (define-key hm--html-region-frame-map "b" 'hm--html-add-body-to-region)
  144.   (define-key hm--html-region-frame-map 
  145.     [(control t)] 'hm--html-add-title-and-header-to-region)
  146.   (define-key hm--html-region-frame-map "t" 'hm--html-add-title-to-region)
  147.   (define-key hm--html-region-frame-map "h" 'hm--html-add-header-to-region)
  148.   (define-key hm--html-region-frame-map "a" 'hm--html-add-address-to-region)
  149.   )
  150.  
  151. (defvar hm--html-noregion-structure-map nil
  152.   "Noregion sub keymap for inserting entities.")
  153.  
  154. (if hm--html-noregion-structure-map
  155.     ()
  156.   (setq hm--html-noregion-structure-map (make-sparse-keymap))
  157.   (define-key hm--html-noregion-structure-map
  158.     "i" 'hm--html-add-list-or-menu-item)
  159.   (define-key hm--html-noregion-structure-map "m" 'hm--html-add-menu)
  160.   (define-key hm--html-noregion-structure-map "u" 'hm--html-add-list)
  161.   (define-key hm--html-noregion-structure-map "o" 'hm--html-add-numberlist)
  162.   (define-key hm--html-noregion-structure-map "d" 'hm--html-add-directory-list)
  163.   (define-key hm--html-noregion-structure-map 
  164.     "\C-dl" 'hm--html-add-description-list)
  165.   (define-key hm--html-noregion-structure-map 
  166.     "\C-dt" 'hm--html-add-description-title)
  167.   (define-key hm--html-noregion-structure-map 
  168.     "\C-de" 'hm--html-add-description-entry)
  169.   (define-key hm--html-noregion-structure-map 
  170.     "\C-d\C-t" 'hm--html-add-description-title-and-entry)
  171.   (define-key hm--html-noregion-structure-map
  172.     "\C-tt" 'hm--html-add-table)
  173.   (define-key hm--html-noregion-structure-map 
  174.     "\C-t\C-t" 'hm--html-add-table-title)
  175.   (define-key hm--html-noregion-structure-map 
  176.     "\C-th" 'hm--html-add-table-header)
  177.   (define-key hm--html-noregion-structure-map 
  178.     "\C-tr" 'hm--html-add-first-table-row)
  179.   (define-key hm--html-noregion-structure-map 
  180.     "\C-t\C-r" 'hm--html-add-additional-table-row)
  181.   (define-key hm--html-noregion-structure-map "p" 'hm--html-add-paragraph)
  182.   (define-key hm--html-noregion-structure-map 
  183.     "\C-p" 'hm--html-add-paragraph-separator)
  184.   (define-key hm--html-noregion-structure-map
  185.     [(meta d)] 'hm--html-add-document-division)
  186.   (define-key hm--html-noregion-structure-map "\C-m" 'hm--html-add-line-break)
  187.   (define-key hm--html-noregion-structure-map 
  188.     "h" 'hm--html-add-horizontal-rule)
  189.   )
  190.  
  191. (defvar hm--html-region-structure-map nil
  192.   "Region sub keymap for inserting entities.")
  193.  
  194. (if hm--html-region-structure-map
  195.     ()
  196.   (setq hm--html-region-structure-map (make-sparse-keymap))
  197.   (define-key hm--html-region-structure-map
  198.     "i" 'hm--html-add-list-or-menu-item-to-region)
  199.   (define-key hm--html-region-structure-map "m" 'hm--html-add-menu-to-region)
  200.   (define-key hm--html-region-structure-map "u" 'hm--html-add-list-to-region)
  201.   (define-key hm--html-region-structure-map 
  202.     "o" 'hm--html-add-numberlist-to-region)
  203.   (define-key hm--html-region-structure-map 
  204.     "d" 'hm--html-add-directorylist-to-region)
  205.   (define-key hm--html-region-structure-map 
  206.     "\C-dl" 'hm--html-add-description-list-to-region)
  207.   (define-key hm--html-region-structure-map 
  208.     "\C-dt" 'hm--html-add-description-title-to-region)
  209.   (define-key hm--html-region-structure-map 
  210.     "\C-de" 'hm--html-add-description-entry-to-region)
  211.   (define-key hm--html-region-structure-map
  212.     "\C-tt" 'hm--html-add-table-to-region)
  213.   (define-key hm--html-region-structure-map 
  214.     "\C-t\C-t" 'hm--html-add-table-title-to-region)
  215.   (define-key hm--html-region-structure-map 
  216.     "p" 'hm--html-add-paragraph-to-region)
  217.   (define-key hm--html-region-structure-map
  218.     [(meta d)] 'hm--html-add-document-division-to-region)
  219.   )
  220.  
  221. (defvar hm--html-noregion-formatting-paragraph-map nil
  222.   "Noregion sub keymap for inserting paragraph formatting elements.")
  223.  
  224. (if hm--html-noregion-formatting-paragraph-map
  225.     ()
  226.   (setq hm--html-noregion-formatting-paragraph-map (make-sparse-keymap))
  227. ;  (define-key hm--html-noregion-formatting-paragraph-map
  228. ;    "o" 'hm--html-add-plaintext)
  229.   (define-key hm--html-noregion-formatting-paragraph-map
  230.     "p" 'hm--html-add-preformatted)
  231.   (define-key hm--html-noregion-formatting-paragraph-map
  232.     "b" 'hm--html-add-blockquote)
  233.   (define-key hm--html-noregion-formatting-paragraph-map
  234.     "\C-b" 'hm--html-add-basefont)
  235.   (define-key hm--html-noregion-formatting-paragraph-map
  236.     "f" 'hm--html-add-font)
  237.   (define-key hm--html-noregion-formatting-paragraph-map
  238.     "c" 'hm--html-add-center)
  239.   (define-key hm--html-noregion-formatting-paragraph-map
  240.     "\C-c" 'hm--html-add-comment)
  241. ;  (define-key hm--html-noregion-formatting-paragraph-map
  242. ;    "l" 'hm--html-add-listing)
  243. ;  (define-key hm--html-noregion-formatting-paragraph-map
  244. ;    "a" 'hm--html-add-abstract)
  245.   )
  246.  
  247. (defvar hm--html-region-formatting-paragraph-map nil
  248.   "Region sub keymap for inserting paragraph formatting elements.")
  249.  
  250. (if hm--html-region-formatting-paragraph-map
  251.     ()
  252.   (setq hm--html-region-formatting-paragraph-map (make-sparse-keymap))
  253. ;  (define-key hm--html-region-formatting-paragraph-map
  254. ;    "o" 'hm--html-add-plaintext-to-region)
  255.   (define-key hm--html-region-formatting-paragraph-map
  256.     "p" 'hm--html-add-preformatted-to-region)
  257.   (define-key hm--html-region-formatting-paragraph-map
  258.     "b" 'hm--html-add-blockquote-to-region)
  259.   (define-key hm--html-region-formatting-paragraph-map
  260.     "\C-b" 'hm--html-add-basefont-to-region)
  261.   (define-key hm--html-region-formatting-paragraph-map
  262.     "f" 'hm--html-add-font-to-region)
  263.   (define-key hm--html-region-formatting-paragraph-map
  264.     "c" 'hm--html-add-center-to-region)
  265.   (define-key hm--html-region-formatting-paragraph-map
  266.     "\C-c" 'hm--html-add-comment-to-region)
  267. ;  (define-key hm--html-region-formatting-paragraph-map
  268. ;    "l" 'hm--html-add-listing-to-region)
  269. ;  (define-key hm--html-region-formatting-paragraph-map
  270. ;    "a" 'hm--html-add-abstract-to-region)
  271.   )
  272.  
  273. (defvar hm--html-noregion-formatting-word-map nil
  274.   "Norgion sub keymap for inserting physical text formatting elements.")
  275.  
  276. (if hm--html-noregion-formatting-word-map
  277.     ()
  278.   (setq hm--html-noregion-formatting-word-map (make-sparse-keymap))
  279.   (define-key hm--html-noregion-formatting-word-map
  280.     "b" 'hm--html-add-bold)
  281.   (define-key hm--html-noregion-formatting-word-map
  282.     "i" 'hm--html-add-italic)
  283.   (define-key hm--html-noregion-formatting-word-map
  284.     "u" 'hm--html-add-underline)
  285.   (define-key hm--html-noregion-formatting-word-map
  286.     "t" 'hm--html-add-fixed)
  287.   (define-key hm--html-noregion-formatting-word-map
  288.     "s" 'hm--html-add-strikethru)
  289.   (define-key hm--html-noregion-formatting-word-map
  290.     "\C-p" 'hm--html-add-superscript)
  291.   (define-key hm--html-noregion-formatting-word-map
  292.     "\C-b" 'hm--html-add-subscript)
  293.   (define-key hm--html-noregion-formatting-word-map
  294.     "e" 'hm--html-add-emphasized)
  295.   (define-key hm--html-noregion-formatting-word-map
  296.     "\C-s" 'hm--html-add-strong)
  297.   (define-key hm--html-noregion-formatting-word-map
  298.     "\M-s" 'hm--html-add-small)
  299.   (define-key hm--html-noregion-formatting-word-map
  300.     "\M-b" 'hm--html-add-big)
  301.   )
  302.  
  303. (defvar hm--html-region-formatting-word-map nil
  304.   "Region sub keymap for inserting word text formatting elements.")
  305.  
  306. (if hm--html-region-formatting-word-map
  307.     ()
  308.   (setq hm--html-region-formatting-word-map (make-sparse-keymap))
  309.   (define-key hm--html-region-formatting-word-map
  310.     "b" 'hm--html-add-bold-to-region)
  311.   (define-key hm--html-region-formatting-word-map
  312.     "i" 'hm--html-add-italic-to-region)
  313.   (define-key hm--html-region-formatting-word-map
  314.     "u" 'hm--html-add-underline-to-region)
  315.   (define-key hm--html-region-formatting-word-map
  316.     "t" 'hm--html-add-fixed-to-region)
  317.   (define-key hm--html-region-formatting-word-map
  318.     "s" 'hm--html-add-strikethru-to-region)
  319.   (define-key hm--html-region-formatting-word-map
  320.     "\C-p" 'hm--html-add-superscript-to-region)
  321.   (define-key hm--html-region-formatting-word-map
  322.     "\C-b" 'hm--html-add-subscript-to-region)
  323.   (define-key hm--html-region-formatting-word-map
  324.     "e" 'hm--html-add-emphasized-to-region)
  325.   (define-key hm--html-region-formatting-word-map
  326.     "\C-s" 'hm--html-add-strong-to-region)
  327.   (define-key hm--html-region-formatting-word-map
  328.     "\M-s" 'hm--html-add-small-to-region)
  329.   (define-key hm--html-region-formatting-word-map
  330.     "\M-b" 'hm--html-add-big-to-region)
  331.   )
  332.  
  333. (defvar hm--html-noregion-include-map nil
  334.   "Noregion sub keymap for include images and other stuff.")
  335.  
  336. (if hm--html-noregion-include-map
  337.     ()
  338.   (setq hm--html-noregion-include-map (make-sparse-keymap))
  339.   (define-key hm--html-noregion-include-map
  340.     [(control i) (t)] 'hm--html-add-image-top)
  341.   (define-key hm--html-noregion-include-map
  342.     [(control i) (m)] 'hm--html-add-image-middle)
  343.   (define-key hm--html-noregion-include-map
  344.     [(control i) (b)] 'hm--html-add-image-bottom)
  345.   (define-key hm--html-noregion-include-map "i" 'hm--html-add-image)
  346.   (define-key hm--html-noregion-include-map [(meta i)] 'hm--html-add-image-map)
  347.   (define-key hm--html-noregion-include-map "m" 'hm--html-add-map)
  348.   (define-key hm--html-noregion-include-map [(control a)] 'hm--html-add-area)
  349.   (define-key hm--html-noregion-include-map "a" 'hm--html-add-applet)
  350.   (define-key hm--html-noregion-include-map "p" 'hm--html-add-applet-parameter)
  351.   )
  352.  
  353. (defvar hm--html-region-include-map nil
  354.   "Region sub keymap for include images and other stuff.")
  355.  
  356. (if hm--html-region-include-map
  357.     ()
  358.   (setq hm--html-region-include-map (make-sparse-keymap))
  359.   (define-key hm--html-region-include-map "m" 'hm--html-add-map-to-region)
  360.   (define-key hm--html-region-include-map "a" 'hm--html-add-applet-to-region)
  361.   )
  362.  
  363. ;(defvar hm--html-noregion-text-elements-map nil
  364. ;  "Noregion sub keymap for inserting text elements.")
  365.  
  366. ;(if hm--html-noregion-text-elements-map
  367. ;    ()
  368. ;  (setq hm--html-noregion-text-elements-map (make-sparse-keymap))
  369. ;  )
  370.  
  371. ;(defvar hm--html-region-text-elements-map nil
  372. ;  "Region sub keymap for inserting text elements.")
  373.  
  374. ;(if hm--html-region-text-elements-map
  375. ;    ()
  376. ;  (setq hm--html-region-text-elements-map (make-sparse-keymap))
  377. ;  )
  378.  
  379. (defvar hm--html-noregion-forms-map nil
  380.   "Noregion sub keymap for inserting forms.")
  381.  
  382. (if hm--html-noregion-forms-map
  383.     ()
  384.   (setq hm--html-noregion-forms-map (make-sparse-keymap))
  385.  
  386.   (define-key hm--html-noregion-forms-map "f" 'hm--html-add-form)
  387.   (define-key hm--html-noregion-forms-map "a" 'hm--html-form-add-input-audio)
  388.   (define-key hm--html-noregion-forms-map
  389.     "c" 'hm--html-form-add-input-checkbox)
  390.   (define-key hm--html-noregion-forms-map
  391.     "d" 'hm--html-form-add-input-date)
  392.   (define-key hm--html-noregion-forms-map
  393.     "\C-f" 'hm--html-form-add-input-float)
  394.   (define-key hm--html-noregion-forms-map "i" 'hm--html-form-add-input-image)
  395.   (define-key hm--html-noregion-forms-map
  396.     "\C-i" 'hm--html-form-add-input-integer)
  397.   (define-key hm--html-noregion-forms-map
  398.     "\M-i" 'hm--html-form-add-input-isindex)
  399.   (define-key hm--html-noregion-forms-map
  400.     "p" 'hm--html-form-add-input-password)
  401.   (define-key hm--html-noregion-forms-map "r" 'hm--html-form-add-input-radio)
  402.   (define-key hm--html-noregion-forms-map
  403.     "\C-r" 'hm--html-form-add-input-reset)
  404.   (define-key hm--html-noregion-forms-map
  405.     "\C-s" 'hm--html-form-add-input-scribble)
  406.   (define-key hm--html-noregion-forms-map "s" 'hm--html-form-add-input-submit)
  407.   (define-key hm--html-noregion-forms-map "t" 'hm--html-form-add-input-text)
  408.   (define-key hm--html-noregion-forms-map "u" 'hm--html-form-add-input-url)
  409.   (define-key hm--html-noregion-forms-map "o" 'hm--html-form-add-select-option)
  410.   (define-key hm--html-noregion-forms-map
  411.     "m" 'hm--html-form-add-select-option-menu)
  412.   (define-key hm--html-noregion-forms-map
  413.     "l" 'hm--html-form-add-select-scrolled-list)
  414.   (define-key hm--html-noregion-forms-map "\C-t" 'hm--html-form-add-textarea)
  415.   )
  416.  
  417. (defvar hm--html-region-forms-map nil
  418.   "Region sub keymap for inserting forms.")
  419.  
  420. (if hm--html-region-forms-map
  421.     ()
  422.   (setq hm--html-region-forms-map (make-sparse-keymap))
  423.  
  424.   (define-key hm--html-region-forms-map "f" 'hm--html-add-form-to-region)
  425.   )
  426.  
  427. (defvar hm--html-region-sub-map-1 nil
  428.   "Region sub keymap for the `hm--html-mode'.")
  429.  
  430. (if hm--html-region-sub-map-1
  431.     ()
  432.   (setq hm--html-region-sub-map-1 (make-sparse-keymap))
  433.   (define-key hm--html-region-sub-map-1 "\C-o" hm--html-region-forms-map)
  434.   (define-key hm--html-region-sub-map-1 "\C-a" hm--html-region-anchor-map)
  435.   (define-key hm--html-region-sub-map-1 "\C-i" hm--html-region-include-map)
  436. ;  (define-key hm--html-region-sub-map-1 
  437. ;    "\C-t" hm--html-region-text-elements-map)
  438.   (define-key hm--html-region-sub-map-1 "\C-f" hm--html-region-frame-map)
  439.   (define-key hm--html-region-sub-map-1 "\C-s" hm--html-region-structure-map)
  440.   (define-key hm--html-region-sub-map-1 
  441.     "\C-p" hm--html-region-formatting-paragraph-map)
  442.   (define-key hm--html-region-sub-map-1
  443.     "\C-w" hm--html-region-formatting-word-map)
  444.   )
  445.  
  446. (defvar hm--html-noregion-sub-map-1 nil
  447.   "Noregion sub keymap for the `hm--html-mode'.")
  448.  
  449. (if hm--html-noregion-sub-map-1
  450.     ()
  451.   (setq hm--html-noregion-sub-map-1 (make-sparse-keymap))
  452.   
  453.   (define-key hm--html-noregion-sub-map-1 "\C-o" hm--html-noregion-forms-map)
  454.   (define-key hm--html-noregion-sub-map-1 "\C-a" hm--html-noregion-anchor-map)
  455.   (define-key hm--html-noregion-sub-map-1 
  456.     [(control i)] hm--html-noregion-include-map)
  457. ;  (define-key hm--html-noregion-sub-map-1 
  458. ;    "\C-t" hm--html-noregion-text-elements-map)
  459.   (define-key hm--html-noregion-sub-map-1 "\C-f" hm--html-noregion-frame-map)
  460.   (define-key hm--html-noregion-sub-map-1 
  461.     "\C-s" hm--html-noregion-structure-map)
  462.   (define-key hm--html-noregion-sub-map-1
  463.     "\C-p" hm--html-noregion-formatting-paragraph-map)
  464.   (define-key hm--html-noregion-sub-map-1
  465.     "\C-w" hm--html-noregion-formatting-word-map)
  466.   )
  467.  
  468. (defvar hm--html-region-sub-map nil
  469.   "Region sub keymap for the `hm--html-mode'.")
  470.  
  471. (if hm--html-region-sub-map
  472.     ()
  473.   (setq hm--html-region-sub-map (make-sparse-keymap))
  474. ;  (define-key hm--html-region-sub-map "\C-n" hm--html-noregion-sub-map-1)
  475. ;  (define-key hm--html-region-sub-map "\C-r" hm--html-region-sub-map-1)
  476.   (define-key hm--html-region-sub-map "\M-n" hm--html-noregion-sub-map-1)
  477.   (define-key hm--html-region-sub-map "\M-r" hm--html-region-sub-map-1)
  478.  
  479.   (if (adapt-emacs19p)
  480.       (map-keymap '(lambda (key-description-list binding)
  481.              (define-key hm--html-region-sub-map
  482.                (vector key-description-list) binding))
  483. ;               (single-key-description key-description-list) binding))
  484.           hm--html-region-sub-map-1)
  485.     (map-keymap '(lambda (key-description-list binding)
  486.            (define-key hm--html-region-sub-map
  487.              key-description-list binding))
  488.         hm--html-region-sub-map-1)
  489.     )
  490.   )
  491.  
  492. (defvar hm--html-noregion-sub-map nil
  493.   "Noregion keymap for the `hm--html-mode'.")
  494.  
  495. (if hm--html-noregion-sub-map
  496.     ()
  497.   (setq hm--html-noregion-sub-map (make-sparse-keymap))
  498. ;  (define-key hm--html-noregion-sub-map "\C-n" hm--html-noregion-sub-map-1)
  499. ;  (define-key hm--html-noregion-sub-map "\C-r" hm--html-region-sub-map-1)
  500.   (define-key hm--html-noregion-sub-map "\M-n" hm--html-noregion-sub-map-1)
  501.   (define-key hm--html-noregion-sub-map "\M-r" hm--html-region-sub-map-1)
  502.  
  503.   (if (adapt-emacs19p)
  504.       (map-keymap '(lambda (key-description-list binding)
  505.              (define-key hm--html-noregion-sub-map
  506.                (vector key-description-list) binding))
  507. ;               (single-key-description key-description-list) binding))
  508.           hm--html-noregion-sub-map-1)
  509.     (map-keymap '(lambda (key-description-list binding)
  510.            (define-key hm--html-noregion-sub-map
  511.              key-description-list binding))
  512.         hm--html-noregion-sub-map-1)
  513.     )
  514.   )
  515.  
  516. (defvar hm--html-mode-map nil
  517.   "Normal and noregion keymap for the `hm--html-mode'.")
  518.  
  519. (if hm--html-mode-map
  520.     ()
  521.   (setq hm--html-mode-map (make-sparse-keymap))
  522.   (define-key hm--html-mode-map 
  523.     hm--html-mode-prefix-key hm--html-noregion-sub-map)
  524.   (if (adapt-xemacsp)
  525.       (progn
  526.     (define-key hm--html-mode-map '(button3) 'hm--html-popup-menu)
  527.     (define-key hm--html-mode-map 
  528.       [(meta control button1)] 'idd-mouse-drag-and-drop))
  529. ;    (define-key hm--html-mode-map [down-mouse-3] 'hm--html-popup-menu)
  530.     (if hm--html-expert
  531.     (define-key hm--html-mode-map
  532.       hm--html-emacs19-popup-noregion-menu-button
  533.       hm--html-menu-noregion-expert-map)
  534.       (define-key hm--html-mode-map
  535.       hm--html-emacs19-popup-noregion-menu-button
  536.       hm--html-menu-noregion-novice-map))
  537.     (define-key hm--html-mode-map
  538.       [(meta control mouse-1)] 'idd-mouse-drag-and-drop))
  539.   (if hm--html-bind-latin-1-char-entities
  540.       (progn
  541.     (define-key hm--html-mode-map [adiaeresis] 'hm--html_ae)
  542.     (define-key hm--html-mode-map [odiaeresis] 'hm--html_oe) 
  543.     (define-key hm--html-mode-map [udiaeresis] 'hm--html_ue)
  544.       (define-key hm--html-mode-map [aring]      'hm--html_aa)
  545.     (define-key hm--html-mode-map [Adiaeresis] 'hm--html_Ae) 
  546.     (define-key hm--html-mode-map [Odiaeresis] 'hm--html_Oe) 
  547.     (define-key hm--html-mode-map [Udiaeresis] 'hm--html_Ue)
  548.       (define-key hm--html-mode-map [Aring]      'hm--html_Aa)
  549.     (define-key hm--html-mode-map [ediaeresis] 'hm--html_ediaeresis) 
  550.     (define-key hm--html-mode-map [Ediaeresis] 'hm--html_Ediaeresis) 
  551.     (define-key hm--html-mode-map [idiaeresis] 'hm--html_idiaeresis) 
  552.     (define-key hm--html-mode-map [Idiaeresis] 'hm--html_Idiaeresis) 
  553.     (define-key hm--html-mode-map [ssharp] 'hm--html_sz) 
  554.     (define-key hm--html-mode-map [aacute] 'hm--html_aacute) 
  555.     (define-key hm--html-mode-map [eacute] 'hm--html_eacute) 
  556.     (define-key hm--html-mode-map [iacute] 'hm--html_iacute) 
  557.     (define-key hm--html-mode-map [oacute] 'hm--html_oacute) 
  558.     (define-key hm--html-mode-map [uacute] 'hm--html_uacute) 
  559.     (define-key hm--html-mode-map [Aacute] 'hm--html_Aacute) 
  560.     (define-key hm--html-mode-map [Eacute] 'hm--html_Eacute) 
  561.     (define-key hm--html-mode-map [Iacute] 'hm--html_Iacute) 
  562.     (define-key hm--html-mode-map [Oacute] 'hm--html_Oacute) 
  563.     (define-key hm--html-mode-map [Uacute] 'hm--html_Uacute) 
  564.     (define-key hm--html-mode-map [agrave] 'hm--html_agrave) 
  565.     (define-key hm--html-mode-map [egrave] 'hm--html_egrave) 
  566.     (define-key hm--html-mode-map [igrave] 'hm--html_igrave) 
  567.     (define-key hm--html-mode-map [ograve] 'hm--html_ograve) 
  568.     (define-key hm--html-mode-map [ugrave] 'hm--html_ugrave) 
  569.     (define-key hm--html-mode-map [Agrave] 'hm--html_Agrave) 
  570.     (define-key hm--html-mode-map [Egrave] 'hm--html_Egrave) 
  571.     (define-key hm--html-mode-map [Igrave] 'hm--html_Igrave) 
  572.     (define-key hm--html-mode-map [Ograve] 'hm--html_Ograve) 
  573.     (define-key hm--html-mode-map [Ugrave] 'hm--html_Ugrave) 
  574.     (define-key hm--html-mode-map [ccedilla] 'hm--html_ccedilla) 
  575.     (define-key hm--html-mode-map [Ccedilla] 'hm--html_Ccedilla) 
  576.     (define-key hm--html-mode-map [acircumflex] 'hm--html_acircumflex) 
  577.     (define-key hm--html-mode-map [ecircumflex] 'hm--html_ecircumflex) 
  578.     (define-key hm--html-mode-map [icircumflex] 'hm--html_icircumflex) 
  579.     (define-key hm--html-mode-map [ocircumflex] 'hm--html_ocircumflex) 
  580.     (define-key hm--html-mode-map [ucircumflex] 'hm--html_ucircumflex) 
  581.     (define-key hm--html-mode-map [Acircumflex] 'hm--html_Acircumflex) 
  582.     (define-key hm--html-mode-map [Ecircumflex] 'hm--html_Ecircumflex) 
  583.     (define-key hm--html-mode-map [Icircumflex] 'hm--html_Icircumflex) 
  584.     (define-key hm--html-mode-map [Ocircumflex] 'hm--html_Ocircumflex) 
  585.     (define-key hm--html-mode-map [Ucircumflex] 'hm--html_Ucircumflex)
  586.     (define-key hm--html-mode-map [atilde] 'hm--html_atilde) 
  587.     (define-key hm--html-mode-map [otilde] 'hm--html_otilde) 
  588.     (define-key hm--html-mode-map [ntilde] 'hm--html_ntilde) 
  589.     (define-key hm--html-mode-map [Atilde] 'hm--html_Atilde) 
  590.     (define-key hm--html-mode-map [Otilde] 'hm--html_Otilde) 
  591.     (define-key hm--html-mode-map [Ntilde] 'hm--html_Ntilde) 
  592.     (define-key hm--html-mode-map [eth] 'hm--html_eth) 
  593.     (define-key hm--html-mode-map [ETH] 'hm--html_Eth) 
  594.     (define-key hm--html-mode-map [thorn] 'hm--html_thorn) 
  595.     (define-key hm--html-mode-map [THORN] 'hm--html_Thorn) 
  596.     ))
  597.   (define-key hm--html-mode-map "<" 'hm--html-smart-less-than)
  598.   (define-key hm--html-mode-map ">" 'hm--html-smart-greater-than)
  599.   (define-key hm--html-mode-map "&" 'hm--html-smart-ampersand)
  600.   )
  601.  
  602. (defvar hm--html-region-mode-map nil
  603.   "Region keymap for the `hm--html-mode'.")
  604.  
  605. (if hm--html-region-mode-map
  606.     ()
  607.   (setq hm--html-region-mode-map (make-sparse-keymap))
  608.   (define-key hm--html-region-mode-map 
  609.     hm--html-mode-prefix-key hm--html-region-sub-map)
  610.   (if (adapt-xemacsp)
  611.       (progn
  612.     (define-key hm--html-region-mode-map 
  613.       '(button3) 'hm--html-popup-menu-region)
  614.     (define-key hm--html-region-mode-map 
  615.       [(meta control button1)] 'idd-mouse-drag-and-drop))
  616. ;    (define-key hm--html-region-mode-map
  617. ;      [down-mouse-3] 'hm--html-popup-menu-region)
  618.     (if hm--html-expert
  619.     (define-key hm--html-region-mode-map
  620.       hm--html-emacs19-popup-region-menu-button
  621.       hm--html-menu-region-expert-map)
  622.       (define-key hm--html-region-mode-map
  623.     hm--html-emacs19-popup-region-menu-button
  624.     hm--html-menu-region-novice-map))
  625.     (define-key hm--html-region-mode-map
  626.       [(meta control mouse-1)] 'idd-mouse-drag-and-drop))
  627.   ;; It maybe a better idea to set the following to undefine in this list...
  628. ;  (if hm--html-bind-latin-1-char-entities
  629. ;      (progn
  630. ;    (define-key hm--html-region-mode-map [adiaeresis] 'hm--html_ae)
  631. ;    (define-key hm--html-region-mode-map [odiaeresis] 'hm--html_oe) 
  632. ;    (define-key hm--html-region-mode-map [udiaeresis] 'hm--html_ue)
  633. ;    (define-key hm--html-region-mode-map [aring]      'hm--html_aa)
  634. ;    (define-key hm--html-region-mode-map [Adiaeresis] 'hm--html_Ae) 
  635. ;    (define-key hm--html-region-mode-map [Odiaeresis] 'hm--html_Oe) 
  636. ;    (define-key hm--html-region-mode-map [Udiaeresis] 'hm--html_Ue)
  637. ;     (define-key hm--html-region-mode-map [Aring]      'hm--html_Aa)
  638. ;    (define-key hm--html-region-mode-map 
  639. ;      [ediaeresis] 'hm--html_ediaeresis) 
  640. ;    (define-key hm--html-region-mode-map 
  641. ;      [Ediaeresis] 'hm--html_Ediaeresis) 
  642. ;    (define-key hm--html-region-mode-map 
  643. ;      [idiaeresis] 'hm--html_idiaeresis) 
  644. ;    (define-key hm--html-region-mode-map 
  645. ;      [Idiaeresis] 'hm--html_Idiaeresis) 
  646. ;    (define-key hm--html-region-mode-map [ssharp] 'hm--html_sz) 
  647. ;    (define-key hm--html-region-mode-map [aacute] 'hm--html_aacute) 
  648. ;    (define-key hm--html-region-mode-map [eacute] 'hm--html_eacute) 
  649. ;    (define-key hm--html-region-mode-map [iacute] 'hm--html_iacute) 
  650. ;    (define-key hm--html-region-mode-map [oacute] 'hm--html_oacute) 
  651. ;    (define-key hm--html-region-mode-map [uacute] 'hm--html_uacute) 
  652. ;    (define-key hm--html-region-mode-map [Aacute] 'hm--html_Aacute) 
  653. ;    (define-key hm--html-region-mode-map [Eacute] 'hm--html_Eacute) 
  654. ;    (define-key hm--html-region-mode-map [Iacute] 'hm--html_Iacute) 
  655. ;    (define-key hm--html-region-mode-map [Oacute] 'hm--html_Oacute) 
  656. ;    (define-key hm--html-region-mode-map [Uacute] 'hm--html_Uacute) 
  657. ;    (define-key hm--html-region-mode-map [agrave] 'hm--html_agrave) 
  658. ;    (define-key hm--html-region-mode-map [egrave] 'hm--html_egrave) 
  659. ;    (define-key hm--html-region-mode-map [igrave] 'hm--html_igrave) 
  660. ;    (define-key hm--html-region-mode-map [ograve] 'hm--html_ograve) 
  661. ;    (define-key hm--html-region-mode-map [ugrave] 'hm--html_ugrave) 
  662. ;    (define-key hm--html-region-mode-map [Agrave] 'hm--html_Agrave) 
  663. ;    (define-key hm--html-region-mode-map [Egrave] 'hm--html_Egrave) 
  664. ;    (define-key hm--html-region-mode-map [Igrave] 'hm--html_Igrave) 
  665. ;    (define-key hm--html-region-mode-map [Ograve] 'hm--html_Ograve) 
  666. ;    (define-key hm--html-region-mode-map [Ugrave] 'hm--html_Ugrave) 
  667. ;    (define-key hm--html-region-mode-map [ccedilla] 'hm--html_ccedilla) 
  668. ;    (define-key hm--html-region-mode-map [Ccedilla] 'hm--html_Ccedilla) 
  669. ;    (define-key hm--html-region-mode-map 
  670. ;      [acircumflex] 'hm--html_acircumflex) 
  671. ;    (define-key hm--html-region-mode-map 
  672. ;      [ecircumflex] 'hm--html_ecircumflex) 
  673. ;    (define-key hm--html-region-mode-map 
  674. ;      [icircumflex] 'hm--html_icircumflex) 
  675. ;    (define-key hm--html-region-mode-map 
  676. ;      [ocircumflex] 'hm--html_ocircumflex) 
  677. ;    (define-key hm--html-region-mode-map 
  678. ;      [ucircumflex] 'hm--html_ucircumflex) 
  679. ;    (define-key hm--html-region-mode-map 
  680. ;      [Acircumflex] 'hm--html_Acircumflex) 
  681. ;    (define-key hm--html-region-mode-map 
  682. ;      [Ecircumflex] 'hm--html_Ecircumflex) 
  683. ;    (define-key hm--html-region-mode-map 
  684. ;      [Icircumflex] 'hm--html_Icircumflex) 
  685. ;    (define-key hm--html-region-mode-map 
  686. ;      [Ocircumflex] 'hm--html_Ocircumflex) 
  687. ;    (define-key hm--html-region-mode-map 
  688. ;      [Ucircumflex] 'hm--html_Ucircumflex)
  689. ;    (define-key hm--html-region-mode-map [atilde] 'hm--html_atilde) 
  690. ;    (define-key hm--html-region-mode-map [otilde] 'hm--html_otilde) 
  691. ;    (define-key hm--html-region-mode-map [ntilde] 'hm--html_ntilde) 
  692. ;    (define-key hm--html-region-mode-map [Atilde] 'hm--html_Atilde) 
  693. ;    (define-key hm--html-region-mode-map [Otilde] 'hm--html_Otilde) 
  694. ;    (define-key hm--html-region-mode-map [Ntilde] 'hm--html_Ntilde) 
  695. ;    (define-key hm--html-region-mode-map [eth] 'hm--html_eth) 
  696. ;    (define-key hm--html-region-mode-map [ETH] 'hm--html_Eth) 
  697. ;    (define-key hm--html-region-mode-map [thorn] 'hm--html_thorn) 
  698. ;    (define-key hm--html-region-mode-map [THORN] 'hm--html_Thorn) 
  699. ;    ))
  700.   (define-key hm--html-region-mode-map "<" 'hm--html-smart-less-than)
  701.   (define-key hm--html-region-mode-map ">" 'hm--html-smart-greater-than)
  702.   (define-key hm--html-region-mode-map "&" 'hm--html-smart-ampersand)
  703.   )
  704.  
  705.  
  706. ;;; For the hm--html minor modes
  707. (defvar hm--html-minor-mode-map nil
  708.   "Normal and noregion keymap for the `hm--html-minor-mode'.")
  709.  
  710. (if hm--html-minor-mode-map
  711.     ()
  712.   (setq hm--html-minor-mode-map (make-sparse-keymap))
  713.   (define-key hm--html-minor-mode-map 
  714.     hm--html-minor-mode-prefix-key hm--html-noregion-sub-map)
  715.   (if (adapt-xemacsp)
  716.       (progn
  717.     (define-key hm--html-minor-mode-map 
  718.       '(button3) 'hm--html-popup-minor-html-menu)
  719.     (define-key hm--html-minor-mode-map 
  720.       [(meta control button1)] 'idd-mouse-drag-and-drop))
  721.     (if hm--html-expert
  722.     (define-key hm--html-minor-mode-map 
  723.       hm--html-emacs19-popup-noregion-menu-button
  724.       hm--html-menu-noregion-expert-map)
  725.       (define-key hm--html-minor-mode-map 
  726.       hm--html-emacs19-popup-noregion-menu-button
  727.       hm--html-menu-noregion-novice-map))
  728.     (define-key hm--html-minor-mode-map
  729.       [(meta control mouse-1)] 'idd-mouse-drag-and-drop))
  730.   (define-key hm--html-minor-mode-map "<" 'hm--html-smart-less-than)
  731.   (define-key hm--html-minor-mode-map ">" 'hm--html-smart-greater-than)
  732.   (define-key hm--html-minor-mode-map "&" 'hm--html-smart-ampersand)
  733.   )
  734.  
  735.  
  736. (defvar hm--html-minor-region-mode-map nil
  737.   "Region keymap for the `hm--html-minor-mode'.")
  738.  
  739. (if hm--html-minor-region-mode-map
  740.     ()
  741.   (setq hm--html-minor-region-mode-map (make-sparse-keymap))
  742.   (define-key hm--html-minor-region-mode-map 
  743.     hm--html-minor-mode-prefix-key hm--html-region-sub-map)
  744.   (if (adapt-xemacsp)
  745.       (progn
  746.     (define-key hm--html-minor-region-mode-map 
  747.       '(button3) 'hm--html-popup-minor-html-menu-region)
  748.     (define-key hm--html-minor-region-mode-map 
  749.       [(meta control button1)] 'idd-mouse-drag-and-drop))
  750.     (if hm--html-expert
  751.     (define-key hm--html-minor-region-mode-map
  752.       hm--html-emacs19-popup-region-menu-button 
  753.       hm--html-menu-region-expert-map)
  754.       (define-key hm--html-minor-region-mode-map
  755.       hm--html-emacs19-popup-region-menu-button
  756.       hm--html-menu-region-novice-map))
  757.     (define-key hm--html-minor-region-mode-map
  758.       [(meta control mouse-1)] 'idd-mouse-drag-and-drop))
  759.   (define-key hm--html-minor-region-mode-map "<" 'hm--html-smart-less-than)
  760.   (define-key hm--html-minor-region-mode-map ">" 'hm--html-smart-greater-than)
  761.   (define-key hm--html-minor-region-mode-map "&" 'hm--html-smart-ampersand)
  762.   )
  763.  
  764.  
  765. ;;; Announce the feature hm--html-keys
  766. (provide 'hm--html-keys)
  767.